<script type="text/javascript" language="javascript" src="<?php echo base_url('assets/js/products.js'); ?>"></script>
<div class="container-crm">
    <div class="row pull-left">
        <div class="col-md-5">
            
            <div class="btn-group" style="margin-bottom: 5px">
                <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                    Thao tác <span class="caret"></span>
                </button>
                <ul class="dropdown-menu" role="menu">
                    <li><a href="<?php echo base_url('products/add')?>">Thêm mới sản phẩm</a></li>
                    <li class="divider"></li>
                    <li><a href="#">Nhập liệu từ file excel</a></li>
                    <li class="divider"></li>
                    <li><a href="#">Xuất dữ liệu</a></li>
                    <li class="divider"></li>
                    
                </ul>
            </div>
            
        </div>
        <div class="col-md-5 col-sm-offset-1">
            <button type="button" id="edit_product_button_id" class="btn btn-primary">Sửa</button>
        </div>

    </div>
    <div class="row navbar-template text-center">
        <div class="col-md-12">
            <table id="list_products" class="table table-striped table-bordered table-hover" cellspacing="0" width="100%">
                <thead>
                    <tr>
                        <th>Mã hàng hóa</th>
                        <th>Tên hàng hóa</th>
                        <th>Giá bán</th>
                        <th>Giá vốn</th>
                        <th>Tồn kho</th>

                    </tr>
                </thead>
                <tbody>
                    <?php
                    if ($all_products) {
                        foreach ($all_products as $product) {
                            ?>
                            <tr data-product-id="<?php echo $product->id ?>">
                                <td><?php echo $product->product_code; ?></td>
                                <td><?php echo $product->product_name ?></td>
                                <td><?php echo $product->sale_price ?></td>
                                <td><?php echo $product->cost_price ?></td>
                                <td>20</td>

                            </tr>
                            <?php
                        }
                    }
                    ?>

                </tbody>
            </table>
        </div>


    </div>
</div>

